return {
  event = "VeryLazy",
  -- telescope 模糊搜索
  "nvim-telescope/telescope.nvim",
  dependencies = {
    "nvim-lua/plenary.nvim",
    "nvim-tree/nvim-web-devicons",
    "nvim-treesitter/nvim-treesitter",
    "sharkdp/fd",
    {
      "nvim-telescope/telescope-fzf-native.nvim",
      build = "make",
    },
    -- outline  被 Lspsaga 替代
    "stevearc/aerial.nvim",
    -- undo
    "debugloop/telescope-undo.nvim",

    -- debug ui
    "nvim-telescope/telescope-dap.nvim",
  },
  config = function()
    local builtin = require("telescope.builtin")

    local keymap = vim.keymap

    -- ctrl + j/k 选择某一选项 tab 选择多个选项
    -- telescope 打开的 通过  ctrl + qy  关闭

    -- Global files search
    keymap.set("n", "'tf", builtin.find_files, { desc = "Find files" })
    -- Global words search
    keymap.set("n", "'ts", builtin.live_grep, { desc = "Find words [ripgrep]" }) -- pacman -S ripgrep 命令为 rg "xxx"
    keymap.set("n", "'tw", builtin.grep_string, { desc = "Find words" })
    keymap.set("n", "'th", builtin.help_tags, { desc = "Find help" })
    keymap.set("n", "'td", builtin.diagnostics, { desc = "Toggle diagnostics" })
    keymap.set("n", "'tb", builtin.buffers, { desc = "Find buffers" })
    keymap.set("n", "'to", builtin.oldfiles, { desc = "Find recently opend files" })
    keymap.set("n", "'t/", function()
      local themes = require("telescope.themes")

      builtin.current_buffer_fuzzy_find(themes.get_dropdown({
        winblend = 10,
        previewer = false,
      }))
    end, {
      desc = "Fuzzily search in current buffer",
    })
    -- undo
    keymap.set("n", "'tu", ":Telescope undo<cr>")

    local actions = require("telescope.actions")
    require("telescope").setup({
      defaults = {
        -- The initial mode entered after opening the pop-up window, the default is insert, it can also be normal
        initial_mode = "insert",
        path_display = { "smart" },
        -- Shortcut keys in the window
        mappings = {
          -- i = {
          --   ["<C-k>"] = actions.move_selection_previous,
          --   ["<C-j>"] = actions.move_selection_next,
          --   -- 关闭
          --   ["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
          -- },
          i = {
            -- Moving up and down
            -- ["<C-j>"] = "move_selection_next",
            -- ["<C-k>"] = "move_selection_previous",
            ["<C-j>"] = actions.move_selection_next,
            ["<C-k>"] = actions.move_selection_previous,
            ["<Down>"] = "move_selection_next",
            ["<Up>"] = "move_selection_previous",
            -- history record
            ["<C-n>"] = "cycle_history_next",
            ["<C-p>"] = "cycle_history_prev",
            -- close the window
            ["<C-c>"] = "close",
            ["<C-q>"] = actions.close,
            -- ["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
            -- The preview window scrolls up and down
            ["<C-u>"] = "preview_scrolling_up",
            ["<C-d>"] = "preview_scrolling_down",
          },
          n = {
            ["q"] = actions.close,
          },
        },
        file_ignore_patterns = { "node_modules", "dist", "__pycache__" },
      },
      pickers = {
        -- Built-in pickers configuration
        find_files = {
          -- Find files for skinning, supported parameters are: dropdown, cursor, ivy
          -- theme = "dropdown",
          hidden = false,
        },
      },
      extensions = {
        fzf = {
          fuzzy = true,                   -- false will only do exact matching
          override_generic_sorter = true, -- override the generic sorter
          override_file_sorter = true,    -- override the file sorter
          case_mode = "smart_case",       -- or "ignore_case" or "respect_case"
          -- the default case_mode is "smart_case"
        },
        undo = {
          side_by_side = true,
          layout_strategy = "vertical",
          layout_config = {
            preview_height = 0.8,
          },
        },
        -- aerial = {
        --   -- Display symbols as <root>.<parent>.<symbol>
        --   show_nesting = {
        --     ["_"] = false, -- This key will be the default
        --     json = true,   -- You can set the option for specific filetypes
        --     yaml = true,
        --   },
        -- },
      },
    })

    -- pacman -S fzf
    pcall(require("telescope").load_extension, "fzf")
    -- require("telescope").load_extension('fzf')
    pcall(require("telescope").load_extension, "undo")
    -- pcall(require("telescope").load_extension, "aerial")

    pcall(require("telescope").load_extension, "dap")

    -- -- outline  被 Lspsaga 替代
    -- require("aerial").setup({
    --   layout = {
    --     min_width = 20,
    --   },
    -- })
    -- keymap.set("n", "<leader>a", "<cmd>AerialToggle!<CR>")
  end,
}
